//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Collections.Generic;
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml
{

    class Line : ShapeBase
    {
        public override void ReadXml(ReadContext context)
        {
            using (var c = context.Read(VmlConstants.VmlNamespace+ "line"))
            {

                from = c.GetOptionalString("from");
                to = c.GetOptionalString("to");
                ReadXmlContent(c);
            }
        }

        private string from;
        private string to;

        public override void WriteXml(WriteContext context)
        {
            using (var c = context.Write(VmlConstants.VmlNamespace + "line"))
            {
                c.SetOptionalString("from", from);
                c.SetOptionalString("to", to);
                WriteXmlContent(c);
            }
        }
    }
}